const global = getApp().globalData;
const wxApi = global.wxApi;
const boxs = [
  {
    title: '我的课程',
    img: '/images/home/box-mylesson.png',
    page: '../books/books?type=1&id=1&name=我的课程&isMine=true'
    
  }, {
    title: '我的练习',
    img: '/images/home/box-mypractice.png',
    page: "practice/practice?type=1" 
  }, {
    title: '右脑练习',
    img: '/images/home/box-right-train.png',
    page: 'brain-training/brain-training'
  }, {
    title: '专注力训练',
    img: '/images/home/box-attention.png',
    page: "../attention/attention"   
  }
]
Component({
  data: {
    boxs: boxs
  },
  properties: {
  },
  methods: {
    onBox( e ) {
      let box = e.currentTarget.dataset.box;
      wxApi.navigateTo( box.page );
    }
  }
})